package com.xiaoyang.ssyx.acl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoyang.ssyx.model.acl.Permission;

import java.util.List;
import java.util.Map;

/**
 * @AUTHOR XiaoYang
 * @DATE 2023/6/14-16:29
 * @DESCRIPTION TODO
 */
public interface PermissionService extends IService<Permission> {
    //查询所有菜单
    List<Permission> queryAllPermission();

    //递归删除菜单
    boolean removeChildById(Long id);

    //获取所有权限，根据用户id查询用户分配权限列表
    //List<Permission> getPermissionByRoleId(Long roleId);
    Map<String,Object> getPermissionByRoleId(Long roleId);

    //给某个角色授权
    void saveAdminRole(Long roleId, Long[] permissionIds);
}
